Skip to content

fix: Attachables destroy order of operations#3931

Open
NoelStephensUnity wants to merge 7 commits intodevelop-2.0.0from
fix/attachablebehaviours-despawn-errors-scene-changes
Open

fix: Attachables destroy order of operations#3931
NoelStephensUnity wants to merge 7 commits intodevelop-2.0.0from
fix/attachablebehaviours-despawn-errors-scene-changes

Conversation

@NoelStephensUnity
Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity commented Apr 3, 2026

Purpose of this PR

Fixing an issue with attachables where either an AttachableBehaviour or an AttachableNode can throw an exception or erroneously log an error message if they are attached together prior to a scene unload event where one of the two persists the scene unload event and the other does not.

Jira ticket

MTT-14831

Changelog

  • Fixed: Issue where either an AttachableBehaviour or an AttachableNode can throw an exception or erroneously log an error message if they are attached during a scene unload where one of the two persists the scene unload event and the other does not.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done
    • Used internal NGO examples project.

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests
    • Added AttachableBehaviourSceneLoadTests.

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

This is v2.x.x. specific.

Fixing some issues based on varying destroy order of operations (more recent change where instantiation order does not reflect the order in which they will be destroyed via SceneManager during an in-session scene load (single mode).
Adding the test for this fix.
The actual fix for the issue with additional handling when an attachable's NetworkObject is destroyed while it  is still attached to something else.
Adding change log entry.
Fixing some typos.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review April 8, 2026 04:06
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner April 8, 2026 04:06
removing white space.
fixing spelling typo.
Adding inheritdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant